package com.shanzhi.dify.service;

import com.shanzhi.dify.entity.*;


import java.io.File;
import java.util.List;
import java.util.Map;

public interface DatasetService {
    String getDatasetDocuments(DocumentRequestParam documentRequestParam);

    String uploadFileToDataset(String datasetId, File file);

    void deleteDocument(String datasetId, String documentId);

    /**
     * 知识库搜索
     * @return
     */
    String datasetSearch(DataSetEntity dataSetEntity);

    /**
     * 解析知识库搜索结果
     * @return
     */
    List<String> parseDatasetSearchResult(DataSetEntity dataSetEntity);

    List<DocumentFileEntity> extractSegmentContentForDocument(DataSetEntity dataSetEntity);

    String createDataset(DifyDatasetEntity difyDatasetEntity);

    String updateDataset(String datasetId, String name);

    void deleteDataset(String datasetId);

    /**
     * 创建知识库
     * @return
     */
    String createDataset(DifyKnowledgeEntity knowledgeEntity);


    /**
     *
     *获取上传文件 /datasets/{dataset_id}/documents/{document_id}/upload-file
     */

    Map<String,Object> getUploadFile(String datasetId, List<String> documentIds);


    /**
     * 获取查询文档子分段(块) 按照一个文档文档的来的
     * /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
     */
    Map<String ,Object> getSegmentChildChunks(String datasetId, String documentId, List<String> segmentIds);
}
